#10-1
with open("guest.txt") as f:
    lines=f.readlines()
print(lines)

"""
#10-3
with open("guest.txt","w") as f:
    f.write(input("Enter your name:\n"))


#10-4
while True:
    name=input("Enter your name:")
    if name!="":
        with open("guest.txt","a") as f:
            f.write(name+"\n")

#10-5
while True:
    yuanying=input("Enter your yuanying:")
    if yuanying!="":
        with open("guest.txt","a") as f:
            f.write(yuanying+"\n")

"""